home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / rwvector.lha / RWVector2.1 / rw / mathpack.h < prev    next >
C/C++ Source or Header  |  1989-08-18  |  4KB  |  100 lines

  1. #ifndef MATHPACK_H
  2. #define MATHPACK_H
  3. #pragma once
  4.  
  5. /*
  6.  *    Declarations for Fortran math routines.
  7.  *
  8.  *    Copyright (C) 1988, 1989.
  9.  *
  10.  *    Dr. Thomas Keffer
  11.  *    Rogue Wave Associates
  12.  *    P.O. Box 85341
  13.  *    Seattle WA 98145-1341
  14.  *
  15.  *    Permission to use, copy, modify, and distribute this
  16.  *    software and its documentation for any purpose and
  17.  *    without fee is hereby granted, provided that the
  18.  *    above copyright notice appear in all copies and that
  19.  *    both that copyright notice and this permission notice
  20.  *    appear in supporting documentation.
  21.  *    
  22.  *    This software is provided "as is" without any
  23.  *    expressed or implied warranty.
  24.  *
  25.  *
  26.  *    @(#)mathpack.h    2.1    8/18/89
  27.  */
  28.  
  29. /* Splines under tension: */
  30. extern Fortdecl void curv1_(float* x,    // An array of N increasing abscissae to be interpolated.
  31.             float* y,    /* An array of N ordinates of the values X. */
  32.             int* n,    /* The number of points in X,Y. */
  33.             float* spl1,/* The desired value for the 1'st derivative at X(1).*/
  34.             float* spln,/* The desired value for the 1'st derivative at X(N).*/
  35.             float* temp,/* A working array of length at least N. */
  36.             float* sigma,/* The normalized spline tension. */
  37.             float* yp    /* The returned spline coefficients. */
  38.             );
  39. extern Fortdecl float curv2_(float* t,    /* X Value to be evaluated */
  40.              float* x,    /* From above */
  41.              float* y,    /* From above */
  42.              float* yp,    /* Spline coefficients evaluated by curv1 */
  43.              int* n,    /* Number of points in x, y, yp */
  44.              float* sigma,/* Spline tension. */
  45.              int* it    /* switch */
  46.              );
  47.  
  48. extern Fortdecl void dcurv1_(double* x,    // An array of N increasing abscissae to be interpolated.
  49.             double* y,    /* An array of N ordinates of the values X. */
  50.             int* n,    /* The number of points in X,Y. */
  51.             double* spl1,/* The desired value for the 1'st derivative at X(1).*/
  52.             double* spln,/* The desired value for the 1'st derivative at X(N).*/
  53.             double* temp,/* A working array of length at least N. */
  54.             double* sigma,/* The normalized spline tension. */
  55.             double* yp    /* The returned spline coefficients. */
  56.             );
  57. extern Fortdecl double dcurv2_(double* t,/* X Value to be evaluated */
  58.              double* x,    /* From above */
  59.              double* y,    /* From above */
  60.              double* yp,/* Spline coefficients evaluated by curv1 */
  61.              int* n,    /* Number of points in x, y, yp */
  62.              double* sigma,/* Spline tension. */
  63.              int* it    /* switch */
  64.              );
  65.  
  66. /* Double the resolution of a matrix: */
  67. extern Fortdecl void double_(float*, int*, int*, int*, int*);
  68.  
  69. /* Increase the resolution of a curve: */
  70. extern Fortdecl void carc_(float*, float*, int*, float*, float*, float*, int*);
  71.  
  72. /***********************************************************/
  73. /* Declarations for the NCAR FFT routines */
  74.  
  75. class        DComplex;
  76. class        FComplex;
  77.  
  78. /* Double precision versions: */
  79. extern Fortdecl void dcfftb_(int*, DComplex*, double*);    /* Back transform */
  80. extern Fortdecl void dcfftf_(int*, DComplex*, double*);    /* Forward transform */
  81. extern Fortdecl void dcffti_(int*, double*);        /* Initialize weights */
  82.  
  83. /* Single precision versions: */
  84. extern Fortdecl void cfftb_(int*, FComplex*, float*);    /* Back transform */
  85. extern Fortdecl void cfftf_(int*, FComplex*, float*);    /* Forward transform */
  86. extern Fortdecl void cffti_(int*, float*);        /* Initialize weights */
  87.  
  88. /* define's so that the naming is consistent with other DAIMS software
  89.  * (single precision complex should start with "FC", double with
  90.  * "DC" ) */
  91. #define DCfftb_        dcfftb_
  92. #define DCfftf_        dcfftf_
  93. #define DCffti_        dcffti_
  94.  
  95. #define FCfftb_        cfftb_
  96. #define FCfftf_        cfftf_
  97. #define FCffti_        cffti_
  98.  
  99. #endif MATHPACK_H
  100.